Wire up vsock device to propolis-server#1075
Conversation
Created using jj-spr 0.1.0
| use propolis::vsock::proxy::VsockPortMapping; | ||
|
|
||
| // Port 8008 - VM Attestation RFD 605 | ||
| const ATTESTATION_PORT: u16 = 8008; |
There was a problem hiding this comment.
We need to decide on a port!
There was a problem hiding this comment.
We picked port 605!
|
Paired with @iximeow over a meet to discuss some of this PR. Key takeaways:
|
the other option is to take a |
| pub struct InvalidGuestCid(u64); | ||
|
|
||
| #[derive(Debug, Copy, Clone)] | ||
| pub struct GuestCid(u64); |
There was a problem hiding this comment.
@iximeow I ended up creating a type for this and then threading it through everywhere.
Created using jj-spr 0.1.0
|
(fwiw looks like your test failures are VMs failing to boot which should be sorted as of #1080, if you want to rebase over that) |
iximeow
left a comment
There was a problem hiding this comment.
couple small comments, seems good overall, thanks! morally a +1 but i figure i'll let you get another commit in first 🙏
| ); | ||
|
|
||
| self.devices.insert(vsock.id.clone(), device.clone()); | ||
| chipset.pci_attach(bdf, device); |
There was a problem hiding this comment.
i wanted to double-check my understanding of how the multi-function device bit would get set and currently it's only if there are multiple functions attached on the same bus/device (managed over in Slot::attach). that makes sense, but it also means this is a non-multi-function device from the guest's POV until we attach another function later on.
my read of the spec (and seems to agree with at least linux and illumos) is that it'd be legal to report this device as multi-function that happens to only implement a single function right now. but that it's also pretty low-risk for this device to suddenly become multi-function when there's another function here. so i think being not multi-function today while knowing it'll become multi-function in the future is ok?
There was a problem hiding this comment.
As I understand it from chat, this is okay to leave as is for merging?
There was a problem hiding this comment.
yeah, whatever we do with the multifunction-ness of this device we can (should!) do as a separate change.
Created using jj-spr 0.1.0
This is the plumbing to allow virtio-socket devices to be usable in
propolis-server.Fixes: #1069